<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@include file="/WEB-INF/views/include/head.jsp" %>
<html>
<head>
	<meta name="decorator" content="sysDefault" content="text/html; charset=utf-8"/>
	<link href="${staticPath}/lib/datetimepicker/0.0.11/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<link href="${staticPath}/lib/chosen/1.1.0/chosen.min.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="${staticPath}/lib/ztree/3.5/css/zTreeStyle/zTreeStyle.css" type="text/css">
	<!-- 选择对话框依赖的js -->
	<script src="${staticPath}/lib/ztree/3.5/js/jquery.ztree.all-3.5.js" type="text/javascript"></script>
	<script src="${staticPath}/js/jquery-dialog.js" type="text/javascript"></script>
	<script type="text/javascript" src="${staticPath}/js/bpm/agent/process/start/startIndex.js"></script>
	<script src="${staticPath}/lib/jquery-urldecoder/jquery.urldecoder.min.js" type="text/javascript"></script>
	<title></title> 
	<!-- 
	<style type="text/css">
	div.diagram{
		margin: 20px;
		position: relative;
		background: url('${contextPath}/bpm/agent/process/bpmImage?bpmnDefId=${bpmnDefId}&instanceId=${instanceId}') no-repeat;
		width: ${diagramDiv['width']+600}px;
		height:${diagramDiv['height']+300}px;
	}
	</style> -->
	<script type="text/javascript">
		var rootPath = "${contextPath}";
		var sapUrl="${sapUrl}";
		sapUrl = $.url.decode(sapUrl);
		$(document).ready(function() { 
			 $("#jbxxFrame").attr("src",sapUrl); 
			 
		});
		$(function(){
			var flowStatus = '${flowStatus}';
			var curTaskInfo = '${curTaskInfo}';
			if(flowStatus == 'running'){
				initCurTaskInfo(curTaskInfo);
			}	
		});
	</script>
</head>
<body>
	<div class="panel panel-default"> 
	  <div class="col-xs-12 panel-heading">
	    <h2 class="panel-title o-v-action">
	    	<a class="btn btn-default pull-right" role="button" href="javascript:void(0)" onclick="history.go(-1)">取消</a>
	    </h2>
	  </div> 
	  <tags:message content="${message}"/>
	  <div class="col-sm-12"><h3 class="text-center"></h3> </div> 
	  <div class="col-sm-12" >
		     <ul class="nav nav-tabs" id="myTab">
			  <li class="active"><a href="#home" data-toggle="tab">基本信息</a></li>
			  <li><a href="#workflow"  data-toggle="tab">流程审批</a></li> 
			  <li><a href="#diagram" data-toggle="tab">流程图</a></li>
			</ul> 
			<div class="tab-content" style="height:60%;width:100%">
					<div class="tab-pane active" id="home">
				  		<iframe id="jbxxFrame"   name="jbxxFrame"   
										scrolling="no" frameborder="no" width="100%" height="500px"></iframe>
					 </div>
					 <div class="tab-pane" id="workflow"> 
						<c:import url="flowInfo.jsp" /> 
					</div>
					<div class="tab-pane" id="diagram" style="overflow-x:auto;">
						<!-- div style="margin-top:20px;position:relative;background:url('${contextPath}/bpm/agent/process/bpmImage?bpmnDefId=${bpmnDefId}&instanceId=${instanceId}') no-repeat;width:${bpmDefLayout.width}px;height:${bpmDefLayout.height}px;">
							<c:forEach var="layout" items="${bpmDefLayout.listLayout}">
								<div class="flowNode" id="${layout.nodeId}" style="position:absolute;left:${layout.x}px;top:${layout.y}px;width:${layout.width}px;height:${layout.height}px;" name="${layout.name}" nodetype="${layout.nodeType}"></div>
							</c:forEach> 
						</div> -->
						<iframe id="diagram_iframe" src="${contextPath}/bpm/workflow/queryFlowImage?bpmnDefId=${bpmnDefId}&instanceId=${instanceId}" scrolling="no" frameborder=0 width="100%">
						</iframe>
					</div>
					<div class="panel-footer"></div>
			</div> 
	</div> 
	</div>
</body>
</html>